﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//Import
using ddcCajamarca.BusinessEntities.Documentos;
using System.Data.Entity.ModelConfiguration;
using System.ComponentModel.DataAnnotations.Schema;


namespace ddcCajamarca.Repository.Mapping.Documentos
{
    public class TDocumentarioMap : EntityTypeConfiguration<TDocumentario>
    {
        public TDocumentarioMap()
        {
            this.HasKey(c => c.Id);

            this.Property(c => c.Id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            this.Property(c => c.NombreTramite)
                .HasMaxLength(20)
                .IsRequired();

            this.Property(c => c.DescripcionTramite)
                .HasMaxLength(200)
                .IsOptional();

            this.ToTable("Tramite");
            this.Property(c => c.Id).HasColumnName("Id");
            this.Property(c => c.NombreTramite).HasColumnName("NombreTramite");
            this.Property(c => c.DescripcionTramite).HasColumnName("DescripcionTramite");
        }

    }
}
